////////////////////////////////////////////////////////////////////////////////
//
//
////////////////////////////////////////////////////////////////////////////////
package samples.photoviewer
{
	import mx.collections.ArrayCollection;
	
	[Bindable]
	public class Filters
	{
		//public var name:String;
		public var options:ArrayCollection;
		private var option:Size;
		
		public function Filters(filters:Object=null)
		{
			options = new ArrayCollection();
			if (filters != null)
			{
				fill(filters);
			}
		}
		
		public function fill(filters:Object):void
		{
			//this.name = filters.name;

			//added on 20090207 -- filter
			for (var k:int=0; k <= filters.modifier.length; k++)
			{
				if(k==0)
				{
					options.addItem({label:filters.label,data:null});
				}
				else
				{
					option = new Size(filters.modifier[k-1]);
					options.addItem(option);
				}
			}
		}
	}
}